Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change to monsum URL's #2

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions lib/data/fastbill.crt

This file was deleted.

30 changes: 30 additions & 0 deletions lib/data/fastbill.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN CERTIFICATE-----
MIIFNjCCBB6gAwIBAgIQLyEoCBXW7dj5PmOg9innQDANBgkqhkiG9w0BAQsFADBv
MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk
ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF
eHRlcm5hbCBDQSBSb290MB4XDTE0MTIyMjAwMDAwMFoXDTIwMDUzMDEwNDgzOFow
gZoxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMUAwPgYD
VQQDEzdDT01PRE8gU0hBLTI1NiBPcmdhbml6YXRpb24gVmFsaWRhdGlvbiBTZWN1
cmUgU2VydmVyIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqmmf
h1joLqPHywnNowoVWzUy6HVkVyN4hbJCSFVa7SR2NmyO3c73aTLyhY5mbg14ZXCW
hmd8b9XP1jc49JkfDoFJNi8/+I/GjljlNoRXZ7Ow/SOFI18TI4eh/KYY62oFfyAl
vR8WJ80zboxTNec49Cn6EMj4p9l2jh2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FqePpTkf
I0csHSFsR84hB1eIy4KICgMHvevtKyANZRxX16WYr0LibP93BPNF2sM6
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion lib/fastbill-automatic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module Fastbill
module Automatic
API_BASE = "automatic.fastbill.com"
API_BASE = "app.monsum.com"
API_VERSION = "1.0"
ROOT_PATH = File.dirname(__FILE__)

Expand Down
23 changes: 20 additions & 3 deletions lib/fastbill-automatic/article.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
module Fastbill
module Automatic
class Article < Base
include Fastbill::Automatic::Services::Update

attr_reader :article_number, :title, :description, :unit_price, :allow_multiple, :is_addon, :currency_code,
:vat_percent, :setup_fee, :subscription_interval, :subscription_number_events, :subscription_trail,
:subscription_duration, :subscription_cancellation, :return_url_success, :return_url_cancel, :checkout_url
attr_accessor :article_number,
:title,
:description,
:unit_price,
:allow_multiple,
:is_addon,
:currency_code,
:vat_percent,
:setup_fee,
:subscription_interval,
:subscription_number_events,
:subscription_trail,
:subscription_duration,
:subscription_cancellation,
:return_url_success,
:return_url_cancel,
:checkout_url

attr_reader :article_id

def self.create(attributes)
raise FastbillError.new('Create method not implemented.')
Expand Down
2 changes: 1 addition & 1 deletion lib/fastbill-automatic/request/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def setup_https
@https = Net::HTTP.new(API_BASE, Net::HTTP.https_default_port)
@https.use_ssl = true
@https.verify_mode = OpenSSL::SSL::VERIFY_PEER
@https.ca_file = File.join(ROOT_PATH, "data/fastbill.crt")
#@https.ca_file = File.join(ROOT_PATH, "data/fastbill.pem")
end

def request
Expand Down