You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,28 @@ puts response.to_hash()
53
53
54
54
n.b. the keys of the response hash will always be symbols.
55
55
56
+
## Configuration
57
+
58
+
You may optionally supply a config argument with your API key:
59
+
60
+
```ruby
61
+
require'button'
62
+
63
+
client =Button::Client.new('sk-XXX', {
64
+
hostname:'api.testsite.com',
65
+
port:3000,
66
+
secure:false,
67
+
timeout:5# seconds
68
+
})
69
+
```
70
+
71
+
The supported options are as follows:
72
+
73
+
*`hostname`: Defaults to `api.usebutton.com`.
74
+
*`port`: Defaults to `443` if `config.secure`, else defaults to `80`.
75
+
*`secure`: Whether or not to use HTTPS. Defaults to True. **N.B: Button's API is only exposed through HTTPS. This option is provided purely as a convenience for testing and development.**
76
+
*`timeout`: The time in seconds that may elapse before network requests abort. Defaults to `nil`.
77
+
56
78
## Resources
57
79
58
80
We currently expose only one resource to manage, `Orders`.
0 commit comments